<div id="userMenu">
<div>
<!-- Menu Start -->
	<ul id="menu">
		<li><?php echo CHtml::link('Home',array('/')); ?></li>
		<?php
		foreach($mainMenu as $mm)
		{
    		//print_r($mm);
    		//echo "<hr>";
    		echo '<li>'.CHtml::link($mm['title'],array($mm['url']));
    		if(count($mm['sub'])){
    			echo '<ul>';
    			foreach($mm['sub'] as $sm)
				{
					echo '<li>'.CHtml::link($sm['title'],array($sm['url'])).'</li>';
				}
				echo '</ul>';
    		}
    		echo "</li>";
		}
		//print_r($mainMenu); 
		?>
		<li><?php echo CHtml::link('Logout',array('/login/logout')); ?></li>
	</ul>

<!-- Menu Ends -->
